//Ford Bellman#include<stdio.h>int min (int a, int b);int main () {        int d[101][101] = {10000};        int city,ways,i,a,b,k,l,j;    int array[101][101] = {0};    scanf("%d %d", &city, &ways);        for (i=0; i<ways ; i++) {        scanf("%d %d %d", &a,&b,&k);        array[a][b] = k;        array[b][a] = k;    }        for (l=1; l<city ; l++) {        for (i=1; i<city ; i++) {            for (j=1; j<city ; j++) {                if (i!=j && j!=l) {                    d[i][j] = min(d[i][j],d[i][l]+d[l][j]);                }            }        }    }    printf("%d", d[1][3]);        }int min (int a, int b){        if (a >= b) {return b;}    else        {return a;}    }